<?php
/*
 * EXAMPLE APPLICATION CLASS
 * @autor	Albert Moreno Vendrell
 */
class Example extends Core {
    static $_instance;
	
  	public function __construct($application_name=""){
        $this->db 	= Db::getInstance();
  	}
	
	public function __destruct(){
		
	}

    /*
     * We avoid the cloning of the object. Singleton pattern
     */
    private function __clone(){ }

    /*
     * Start system
     * Function responsible for creating, if necessary, the object. 
     * This is the function must be called from outside the class to instantiate the object, and thus able to use its methods
     * @autor                           Albert Moreno Vendrell
     */
    private function startExample(){
        if (!(self::$_instance instanceof self)){
            self::$_instance=new self();
        }
        return self::$_instance;
    }


	

    /*
     **************************************
     *************** EVENTS ***************
     **************************************
     */

        /*
         * ONCREATE
         * @autor                           Albert Moreno Vendrell
         */
        private function onCreate(){
	        
        }

        /*
         * ONSTART
         * @autor                           Albert Moreno Vendrell
         */
        private function onStart(){
	        
        }

        /*
         * ONRESUME
         * @autor                           Albert Moreno Vendrell
         */
        private function onResume(){
	        
        }

        /*
         * ONPAUSE
         * @autor                           Albert Moreno Vendrell
         */
        private function onPause(){
            
        }

        /*
         * ONSTOP
         * @autor                           Albert Moreno Vendrell
         */
        private function onStop(){
            
        }

        /*
         * ONRESTART
         * @autor                           Albert Moreno Vendrell
         */
        private function onRestart(){
            
        }

        /*
         * ONDESTROY
         * @autor                           Albert Moreno Vendrell
         */
        private function onDestroy(){
            
        }
}